package ${package.Service};

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import ${package.Entity}.${entity};
import github.sf.fw.model.BaseBean;

import java.util.List;

/**
 * ${table.comment!} service
 *
 * @author ${author}
 * @since ${date}
 */
<#if kotlin>
interface ${table.serviceName} : ${superServiceClass}<${entity}>
<#else>
public interface ${table.serviceName} extends ${superServiceClass}<${entity}> {
</#if>
    /**
     * 单条记录查询
     *
     * @param ${entity?uncap_first} 条件
     * @return 记录
     */
    ${entity} query(${entity} ${entity?uncap_first});

    /**
     * 分页查询
     *
     * @param query 查询参数
     * @return 分页数据
     */
    Page${r'<'}${entity}> paging(BaseBean${r'<'}${entity}> query);

    /**
     * 通用列表查询
     *
     * @param ${table.entityName?uncap_first} 查询条件
     * @return 列表
     */
    List<${table.entityName}> listWithCond(${entity} ${entity?uncap_first});

    /**
     * 删除一条
     *
     * @param ${entity?uncap_first} 参数
     * @return 影响条数
     */
    int deleteWithCond(${entity} ${entity?uncap_first});
}
